import request from "@/request/";

//分页
export const getTemList = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp/page",
    method: "POST",
    data,
  });
};

// 新增
export const temAdd = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp/save",
    method: "POST",
    data,
  });
};

// 编辑
export const temEdit = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp/update",
    method: "POST",
    data,
  });
};

// 更新状态
export const temUpdate = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp/enabled",
    method: "POST",
    data,
  });
};

// 删除
export const temRemove = (ids) => {
  return request({
    url: "/api/mes-production-service/label-temp/delete",
    method: "POST",
    data: {
      ids,
    },
  });
};

//标签模板分页
export const getMaterialList = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp-in-material/page",
    method: "POST",
    data,
  });
};

// 新增
export const materialAdd = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp-in-material/save",
    method: "POST",
    data,
  });
};

// 编辑
export const materialEdit = (data) => {
  return request({
    url: "/api/mes-production-service/label-temp-in-material/update",
    method: "POST",
    data,
  });
};

// 删除
export const materialDelete = (ids) => {
  return request({
    url: "/api/mes-production-service/label-temp-in-material/delete",
    method: "POST",
    data: {
      ids,
    },
  });
};
